//判定是否互为字符重排

class Solution {
public:
    bool CheckPermutation(string s1, string s2) {
        if(s1.size() != s2.size()) return false;
        unordered_map<char, int> cnt;
        for(auto ch : s1)
        {
            cnt[ch]++;
        }
        for(auto ch : s2)
        {
            cnt[ch]--;
            if(cnt[ch] < 0) return false;
        }
        return true;
    }
};





